﻿@{
    Layout = "_LayoutAdmin";
}

@model SubscriptionSettingsViewModel

<partial name="_SettingsHeader" />

<form id="form-settings" asp-controller="Settings" asp-action="Subscription"
      data-ajax-begin="onUpdateSettingsBegin"
      data-ajax-complete="onUpdateSettingsComplete"
      data-ajax-failure="onUpdateSettingsFailed"
      data-ajax-success="onUpdateSettingsSuccess"
      data-ajax="true"
      data-ajax-method="POST">
    <div asp-validation-summary="All" class="text-danger"></div>

    <div class="row">
        <div class="col-md-6">
            <div class="card mb-4">
                <div class="card-header">@Localizer["General"]</div>
                <div class="card-body">
                    <div class="form-group">
                        <label asp-for="RssTitle" class="control-label"></label>
                        <input asp-for="RssTitle" class="form-control" />
                        <span asp-validation-for="RssTitle" class="text-danger"></span>
                    </div>
                    <div class="form-group">
                        <label asp-for="RssDescription" class="control-label"></label>
                        <input asp-for="RssDescription" class="form-control" />
                        <span asp-validation-for="RssDescription" class="text-danger"></span>
                    </div>
                    <div class="form-group">
                        <label asp-for="AuthorName" class="control-label"></label>
                        <input asp-for="AuthorName" class="form-control" />
                        <span asp-validation-for="AuthorName" class="text-danger"></span>
                    </div>
                    <div class="form-group">
                        <label asp-for="RssCopyright" class="control-label"></label>
                        <input asp-for="RssCopyright" class="form-control" />
                        <span asp-validation-for="RssCopyright" class="text-danger"></span>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-md-6">
            <div class="card mb-4">
                <div class="card-header">@Localizer["Advanced"]</div>
                <ul class="list-group list-group-flush">
                    <li class="list-group-item">
                        <label asp-for="UseFullContent" class="control-label"></label>
                        <div class="material-switch float-right">
                            <input @(Model.UseFullContent ? "checked=\"checked\"" : "") id="UseFullContent" name="UseFullContent" type="checkbox" value="true">
                            <label for="UseFullContent" class="label-success"></label>
                            <input name="UseFullContent" type="hidden" value="false">
                        </div>
                    </li>
                </ul>
                <div class="card-body">
                    <div class="form-group">
                        <label asp-for="RssItemCount" class="control-label"></label>
                        <input asp-for="RssItemCount" class="form-control" />
                        <span asp-validation-for="RssItemCount" class="text-danger"></span>
                        <small class="form-text text-muted">@Localizer["The number of entries to include in RSS feed."]</small>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <hr />
    <div class="form-group">
        <input id="btn-save-settings" type="submit" value="@Localizer["Save"]" class="btn btn-success" />
    </div>
</form>